package cn.java59;

import java.util.Scanner;

public class Homework8 {

	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
		int number = (int) (Math.random() * 100);
		System.out.println("请猜一个数字：");
		int num = input.nextInt();
		for (int count = 1; count < 20; count++) {
			if (num != number) {
				System.out.println("幸运数字是" + number + "继续猜数：");
				num = input.nextInt();
			} else {
				switch (count) {
				case 1:
					System.out.println("你太有才了！");
					break;
				case 2:
				case 3:
				case 4:
				case 5:
				case 6:
					System.out.println("这么快就猜出来了，很聪明么！");
					break;
				default:
					System.out.println("猜了半天才猜出来，小同志，尚需努力啊！");
					break;
				}
				return;
			}
		}
		System.out.println("game over");

	}

}
